UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'LatkzH6a2jgR6V3ZQGN5VHOCok237mz2ctfvJBMR+iE=' 
WHERE 
  key_id = 'ea8ed328fe54a5771789ba85d07ec79238a5444a381c5996e29dbdaf1d7f0418' 
  AND (
    token = 'LatkzH6a2jgR6V3ZQGN5VHOCok237mz2ctfvJBMR+iE=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031