title: Best way to update expired users' statuses in a database?
body: <p>In a mysql database for a paid application with a periodic (e.g:monthly) subscription, what is the best way to check for users with an expired subscription and make them inactive?
  Normally I'd just check in the app if their expiry date is passed, but there are several types of accounts, such as free, trial, etc.. which will not have an expiry period.</p>
  
  <p>I'd like to keep things simple on the client application side of things, and make it that it will only need to check for for an 'active' status, and allow the user to use the app, rather than switch case all the account types and expiry dates. Also the account types might vary in the future depending on the customer's request and if the logic is in the (php) back-end then that would allow updates without needing a new client version.</p>
  
  <p>The table would be something like this:</p>
  
  <pre><code>User ID | Expiry date | Status
  </code></pre>
  
  <p>The way I'm currently doing things is that I have a cronjob that runs once in a while and update all the users who's expiry date has passed the current time.</p>
  
  <p>To sum it up my question is:</p>
  
  <ul>
  <li>Will the current method causing spike loads on the server once we go into production and have a large number of users?</li>
  <li>Is there is a better, cleaner way to do this? Whether it's a different update method or a different logic for handling active/inactive users and expiry periods?</li>
  </ul>