UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Xlf4l9JauXDdhhii0cVitOR98H92VQSoiuAVT8SFkak=' 
WHERE 
  key_id = '0a2ad1fc18c2d5a17784aa3c989e35c3f94bb1af6e8d4d18e4058bbf24962fc0' 
  AND (
    token = 'Xlf4l9JauXDdhhii0cVitOR98H92VQSoiuAVT8SFkak=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00018