UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'HYufgMn87pdOawrcYO9c/f/viDoibpnFl5sxV7NZgGo='
WHERE
key_id = '77fd9e06836d88d9c3aeec07574720dbcebe96cd9d673e8e7e2c5cacf9165c8e'
AND (
token = 'HYufgMn87pdOawrcYO9c/f/viDoibpnFl5sxV7NZgGo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)