UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '196LFt/tLajLxr5qxcB9wkmxRmVePUNswCWXfGKdmT0='
WHERE
key_id = 'f07df3a2f0574aac4db4ed1a4fdb633bcf2f9cb069aef9ee7345ffc883669fc4'
AND (
token = '196LFt/tLajLxr5qxcB9wkmxRmVePUNswCWXfGKdmT0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)