UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'GXHsffHIuDtK3rJoR4B+3bizpiocsljn4uwN08Q428g=' 
WHERE 
  key_id = '73aa1d2e534ef290736a54bb4d0030ce4966d09eda85c9b378d192f00fd845b3' 
  AND (
    token = 'GXHsffHIuDtK3rJoR4B+3bizpiocsljn4uwN08Q428g=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031