UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'G+eZ0JwnyDDmEidu4z2dYZW4Dw6hsZiXYZxuAIp5QJ0=' 
WHERE 
  key_id = '22743cac16d41e1d5aa086dc2a6833f98788f80fc0c2d9fa5d9da68384883493' 
  AND (
    token = 'G+eZ0JwnyDDmEidu4z2dYZW4Dw6hsZiXYZxuAIp5QJ0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00013