UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'NUV4/wlXPZ1CcPUlPk/iDu4TF7GiMs//jZ8TZwvVRrM='
WHERE
key_id = '87acadf5eec9b63c24e38980d9a26c5ab648441ec0445e6fc9da98e0ad0423d7'
AND (
token = 'NUV4/wlXPZ1CcPUlPk/iDu4TF7GiMs//jZ8TZwvVRrM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)