UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'aHUoSxD/+tQ+aa+8mUlyVQ6RWTzh68LIaWWC5e3IdW4='
WHERE
key_id = '43e009dfbfc85677a0d4ed71f8e03a6ef3e01a93255e9769e3e6fdc1648182e5'
AND (
token = 'aHUoSxD/+tQ+aa+8mUlyVQ6RWTzh68LIaWWC5e3IdW4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)