UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'O66XO4+/HzeKbY3nUHChX+JUPuzeXu6yFG6uqF5vSrs=' 
WHERE 
  key_id = '63c05dab9adc423063e84f180da5494ea5bc3e60338ec97b2626ea2da18acb02' 
  AND (
    token = 'O66XO4+/HzeKbY3nUHChX+JUPuzeXu6yFG6uqF5vSrs=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00018