CBSubs GroupJive can delete the group on expiration, but not unpublish it. You'll be able to unpublish it using CB Auto Actions though. You'd use a CB GroupJive action in CB Auto Actions with the below usage to unpublish on plan deactive and likely need to republish on plan activate.
Plan Active
Global
Triggers: onCPayUserStateChange
User: Automatic
Access: Everybody
Conditions (custom value conditions)
1: [var3] Equal To PLAN_ID_HERE
2: [var2] Equal To A
Plan Expired
Global
Triggers: onCPayUserStateChange
User: Automatic
Access: Everybody
Conditions (custom value conditions)
1: [var3] Equal To PLAN_ID_HERE
2: [var2] Not Equal To A
Replace PLAN_ID_HERE with the ID of the plan you want this to act on.