Exclusion
The EU treaties are signed in perpetuity.
The Lisbon Treaty Article 50 TEU provides that a country, on its own decision, can leave the EU after two years notice.
Before there was no legal provision for withdrawal from the EU. It was assumed that a state could only leave the EU by a unanimous decision of all member states in the European Council or by proving breach of circumstances in relation to the Vienna Convention on international treaties.
A country can be sanctioned by removing its right to vote, but it cannot be excluded.