UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'xa0MeNwTc5C76fyu1dFL7B94pIwjnOX8q1IH5NpxUtI=' 
WHERE 
  key_id = 'f3ec994ee18c1f137110cc8b815d86678ae9e950dbf3d055ee020c077cf585be' 
  AND (
    token = 'xa0MeNwTc5C76fyu1dFL7B94pIwjnOX8q1IH5NpxUtI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00036