UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'PUD/t2c3X/Wx7Jh+JCjcodhdkXWKgWAUl8LdGHeoJ78='
WHERE
key_id = '1991c6d7ee0abbe4d7c88dfbd5800ec20cb9d9f4a3765d5a630ace48776cade2'
AND (
token = 'PUD/t2c3X/Wx7Jh+JCjcodhdkXWKgWAUl8LdGHeoJ78='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)