UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'xUFGmWCTFOrW0eBjT1tc3LQDGTKwQJEj2wRKH23mIxE='
WHERE
key_id = '22640c29ca91a821252afbe2278d2bd130f721bf05645ab9be69bd8bf8d9cba1'
AND (
token = 'xUFGmWCTFOrW0eBjT1tc3LQDGTKwQJEj2wRKH23mIxE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)