UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'IO7UU8Rc+ZhentoXrnoPdaSOnh/Wub/WTB5LPt/tRkU='
WHERE
key_id = '79733106b835d52a96ef7a80df6b7e8193117d3846a638ac36a412fe33cd3eec'
AND (
token = 'IO7UU8Rc+ZhentoXrnoPdaSOnh/Wub/WTB5LPt/tRkU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)