Automatically cancel Sales Order after X days unapproved
I don’t believe there’s anything to do this as standard so you’d be looking for a Workflow or Script.
With regards the former, it’d be a scheduled workflow. You create a Saved Search to pick up the relevant records and then determine what actions to take as part of the workflow:
I’d start there and if you can’t achieve it, we can look at a scripted solution.
Please let me know if you need any further details.