UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'QBX/QUDjZ+ryuJ7cEVO+lISxOwh7B5FH22krZeBDQJc='
WHERE
key_id = '7a6d2ea21e4b7bab921331859b2d76ad0739c32ab5b30d83b0113b0483b610d1'
AND (
token = 'QBX/QUDjZ+ryuJ7cEVO+lISxOwh7B5FH22krZeBDQJc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)