Hi partner,
We will create a new personal Opportunity view to list all the opportunities that are more than two years old, then create a on-demand workflow to bulk close them.
Step 1. In the Opportunity view, click Create view button.

Select the filter to Create On, Order Than X Years, 2. Save it.

Step 2. Go to Settings > Processes, new a workflow of Opportunity.

Select As an on-demand process, Organization. Add Step - Change Status, select the status to Out-Sold. Activate it.

Step 3. In the personal view, select all records, click Flow > the workflow. Then the selected Opportunities will be closed.

If there are multiple pages of records, run the workflow once per page.
If the number of pages is very large, then I recommend that you use XrmToolBox's "Bulk Workflow Execution" tool to run workflows in batches.