UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'fud/AUPmorwjFmOAJOSRhQXdKcdptTwYWl4Uc/rBN9A='
WHERE
key_id = 'abf7f068a3df761867cffdd0278d9ce60e8a2506161fa451d3fd5729d1c88d40'
AND (
token = 'fud/AUPmorwjFmOAJOSRhQXdKcdptTwYWl4Uc/rBN9A='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)