UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/njIRSXP6IKp3bfNODiCHGW+SA9c2TDbfHESasNR7Jc=' 
WHERE 
  key_id = '725d5ff92367c1fb24bd7800cadf889b2bffedef3fd10850c64ce6ecb349128c' 
  AND (
    token = '/njIRSXP6IKp3bfNODiCHGW+SA9c2TDbfHESasNR7Jc=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00038