UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'MOYJgjOECjE6rzqEq16O8baliwzZFPD5SM0vJMYlWpY=' 
WHERE 
  key_id = '7b6647b2724f9156014c67508513a7e48db62efc2bec5f528dae1ea46f74d525' 
  AND (
    token = 'MOYJgjOECjE6rzqEq16O8baliwzZFPD5SM0vJMYlWpY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00027