UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'BksSBTb7jRLCHZUXjrWn8aBRLEllYZml1qVOCnXvJwQ='
WHERE
key_id = '6c5fbfeb6735bc39e2cbedfbf795aecf493128d8be0d91c2240f82d2ef5c8535'
AND (
token = 'BksSBTb7jRLCHZUXjrWn8aBRLEllYZml1qVOCnXvJwQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)