UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'pqCEJVHyMT8HPpGTc9sZr8Bi5TT/JAajSgMpW399reY=' 
WHERE 
  key_id = '7eec42fb0c84f936669232293c34d741fda287cc3ba7b5a55149b994604ef3ef' 
  AND (
    token = 'pqCEJVHyMT8HPpGTc9sZr8Bi5TT/JAajSgMpW399reY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00034