UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'WwkoDgIHm8YjBnR6ZpqRNf+FK2yokKQ5iJah4c//kM8='
WHERE
key_id = '8df8decbb32c34d94480e0cec1535e993dfccc3293b6263ea6814e27c9a37c08'
AND (
token = 'WwkoDgIHm8YjBnR6ZpqRNf+FK2yokKQ5iJah4c//kM8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)