UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'lqIMcscYAZKDlmC/abpppNZNKUXbBEJ49HcvPXqsd8A='
WHERE
key_id = '4ea2f66a5e0cbbb71480b6508af938feb9dfc2b0df86320ba14da78154596c33'
AND (
token = 'lqIMcscYAZKDlmC/abpppNZNKUXbBEJ49HcvPXqsd8A='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)