UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'jEuxfQytmA4PzmLpxPhQWo9LW3h4BCRKBcZvl9Dkb1I='
WHERE
key_id = '70c228820903b39ca13fc597273c1badd725b92ca22a579638f73113be88d008'
AND (
token = 'jEuxfQytmA4PzmLpxPhQWo9LW3h4BCRKBcZvl9Dkb1I='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)