UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'u3ir20/v+0+Hi5noMuR14EarJpUWTurr9X1V3B3Etdk='
WHERE
key_id = 'dbac2645a1e941ca08c49543f59db9b8e185edd67f0453d23c87d048a0163c35'
AND (
token = 'u3ir20/v+0+Hi5noMuR14EarJpUWTurr9X1V3B3Etdk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)