UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'xvRfcwMl4IhLQh0xCFUkWz/cLnf5pgzBsmQgTt423GI='
WHERE
key_id = '9cfd15f006a10fbc8c4840fa22db6ed87539d41d8cdffcfbb3d1ccf471fed8cb'
AND (
token = 'xvRfcwMl4IhLQh0xCFUkWz/cLnf5pgzBsmQgTt423GI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)