UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'QgsrYwrtTsSUKDMv2pt0gaHZZc5yqW30dNjOAwLNiT8=' 
WHERE 
  key_id = '734a2d8300a8d6d07e954f6a985f70d1f3f4c8c313bdf0bd9904ef85c3d01eca' 
  AND (
    token = 'QgsrYwrtTsSUKDMv2pt0gaHZZc5yqW30dNjOAwLNiT8=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00026