How to check when a user last updated password
Drupal out of the box does not keep track of password changes.  However, there are modules that do:

Drupal 7: The module Force Password Change keeps track of it. The data is in its schema ($schema['force_password_change_users']), in the field last_password_change (shown below):

'last_password_change' =&gt; array (
  'description' =&gt; t('A UNIX timestamp referring to the date that the user last changed their password'),
  'type' =&gt; 'int',
  'unsigned' =&gt; TRUE,
  'length' =&gt; 10,
  'default' =&gt; NULL,
),


Drupal 6: The module Password Expire keeps track of it. The data is in its schema ($schema['password_expire']), in the field timestamp (shown below):

'timestamp' =&gt; array(
  'type' =&gt; 'int',
   'not null' =&gt; 1,
   'unsigned' =&gt; TRUE,
   'default' =&gt; 0,
   'disp-width' =&gt; '11',
   'description' =&gt; 'Date user last updated password',
 ),


You could install one of these modules (depending upon what Drupal version you're using), and just query its table to extract this information as a UNIX timestamp from the field.

It would also be quite trivial to add this by means of a custom module:

You should be able to use hook_form_FORM_ID_alter (where FORM_ID is password_change) to intercept any password changes and record the timestamp for the event along with the uid in a table in the database.