UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '004cUMOxLJMArTOYFUp8VuoDj9tMVAG8CP1qQWts7IE='
WHERE
key_id = 'd35fe10ce080a9e78840d07ce5c427d3ffdc2d32254bd75e1aa1f77a160eb613'
AND (
token = '004cUMOxLJMArTOYFUp8VuoDj9tMVAG8CP1qQWts7IE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)