UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'nFd9qrLvVPBBiElIYg3rrdP6ieh/2LI7nTUykxHcjmA=' 
WHERE 
  key_id = '5b89d6f9d463fa67b3c9935f750241a1628dfa0a026af4409cd163fa83b6e21f' 
  AND (
    token = 'nFd9qrLvVPBBiElIYg3rrdP6ieh/2LI7nTUykxHcjmA=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00030