UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'VNBDa5oEMIICmEtt+5TkpdLI9ME4hkn7IAgs4hcvIys='
WHERE
key_id = '43f3b4792f56c96516bebead3b40303d577f5b0ab334cd0da1424ffe6e2aa5e3'
AND (
token = 'VNBDa5oEMIICmEtt+5TkpdLI9ME4hkn7IAgs4hcvIys='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)