According to the APNs docs
For security, APNs requires you to refresh your token regularly. Refresh your token no more than once every 20 minutes and no less than once every 60 minutes.
when using Token Based Authentication. Besides storing the time at which the last token was generated in memory or some database and checking if it has been an hour since, is there anyway to automatically regenerate the authentication token?