UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '2nXmC9BWZh7xdQrnxpFZPzlo6+aoa34u+plKLzrME0g='
WHERE
key_id = '28349c37d6b3ca9ca1b8b8593723163ccdcd8e75428f5022aa7c37423012dc4f'
AND (
token = '2nXmC9BWZh7xdQrnxpFZPzlo6+aoa34u+plKLzrME0g='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)