In the admin panel, you need to cancel all orders still awaiting processing. In the orders table, set the status to cancelled for every order currently marked pending. Return nothing; only update the data.
Solution requirement
Just INSERT/UPDATE/DELETE — no trailing SELECT needed.