UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'GYQ2mAbTpkPlgK5xN3motP6U9Mc5XY8qlR83axZZ7Os=' 
WHERE 
  key_id = 'db2b600f610f1daf61ba3a5dac08cf27ae578c022cc9f5f14c88a6e5a9fcb7dd' 
  AND (
    token = 'GYQ2mAbTpkPlgK5xN3motP6U9Mc5XY8qlR83axZZ7Os=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00025