code: def prune_database():
      
      now = datetime.now()
      expired = TokenBlacklist.query.filter(TokenBlacklist.expires < now).all()
      for token in expired:
          db.session.delete(token)
      db.session.commit()
docs: Delete tokens that have expired from the database.
  
      How (and if) you call this is entirely up you. You could expose it to an
      endpoint that only administrators could call, you could run it as a cron,
      set it up with flask cli, etc.