    def purge_expired_tokens(self):
        """purge all expiring token objects from the database

        run periodically
        """
        # this should be all the subclasses of Expiring
        for cls in (orm.APIToken, orm.OAuthCode, orm.Share, orm.ShareCode):
            self.log.debug(f"Purging expired {cls.__name__}s")
            cls.purge_expired(self.db)
purge all expiring token objects from the database

run periodically
jupyterhub/app.py