Is there a need to retain the subsites? If so, instead of moving the site, perhaps changing the way your users access the sites would be an easier way. You could set up a list with the current classes (assuming you don't have one already) and include a field in that list that links to the course's subsite. Create a view that shows only the current courses so the end users never see the other subsites.
If you don't need to keep the subsites, you should look into some kind of workflow that can kick off when a class expires that deltes the subsite. I'm pretty sure you can't create a workflow with Nintex or SharePoint Designer to move a site to another location, so you may need to code something with C#.