UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'vO8wDBc0R+53uEdeQaFmnpwOjx9otjRvK+AlvVdZ498=' 
WHERE 
  key_id = 'c79556f98f183950bfae4986b793780509458d95b8d5ae58b5ebc129fcfddacd' 
  AND (
    token = 'vO8wDBc0R+53uEdeQaFmnpwOjx9otjRvK+AlvVdZ498=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00026