UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FWw0B2FduWBut4PIn4VSMH/dr9XpNLpM/++pdskx7PU='
WHERE
key_id = 'f4e6dbba08226be8b03d2937be5bc02231672ff66ab36106d798b92cb8ef330b'
AND (
token = 'FWw0B2FduWBut4PIn4VSMH/dr9XpNLpM/++pdskx7PU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)