UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'VIgmenKhAT1Ogf7zOmhI+J1b4bsiGRazQTDKm128jps=' 
WHERE 
  key_id = '59cae6898179cfbe39eb29c96e92b382952b8d08966e3f35376d2b382f1f563b' 
  AND (
    token = 'VIgmenKhAT1Ogf7zOmhI+J1b4bsiGRazQTDKm128jps=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00026