UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'MWO9uQ1w3WouyDL4jl4gDXzKyAzK7SH6nPAIXvqY97M='
WHERE
key_id = '3fccdc29e6e36e9d6e5e6cbd1625beaced524d6dafb8d29ce18854e525320610'
AND (
token = 'MWO9uQ1w3WouyDL4jl4gDXzKyAzK7SH6nPAIXvqY97M='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)