UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'wfgJkJCwUr6yPFCFDNrWPZJ3Z74C/1f4foxiZdTbkrc='
WHERE
key_id = '090660dc441081713b6c618a4de62cebdf825c542b1b75bff2f7d2c9c48d3dd6'
AND (
token = 'wfgJkJCwUr6yPFCFDNrWPZJ3Z74C/1f4foxiZdTbkrc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)