UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'ETKV13+r3yXCFA/SMqwZbnNosbBrnbJ9xmxoVu2K6fQ=' 
WHERE 
  key_id = '275e75c3f9a17bfa11b7cf3b7de1a94e8a912b9168e7ee2f0965c4293143ece1' 
  AND (
    token = 'ETKV13+r3yXCFA/SMqwZbnNosbBrnbJ9xmxoVu2K6fQ=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00018