UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'OdfvB4dl/Bvheqqq7BQkni5rArvYhbHsLFOB5sH9fDQ='
WHERE
key_id = '1b64f99f24280b08f9729fc8ae0a6e87039a03ec70c68d8f441341ff84725bb2'
AND (
token = 'OdfvB4dl/Bvheqqq7BQkni5rArvYhbHsLFOB5sH9fDQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)