When user open app get data expire date from firebase and compare it with current date which you can get from world time API. If current date is after from expire date then save data on firebase that user plan expired. But do it whenever user open app. Simple as that.