At first it reminded me like any episode of the twilight zone, but then I recall an old 70s sci-fi TV Series: Logan´s Run (1977-1978).
It is the 23rd century, the entire planet has been ravaged by a nuclear war leaving the world as a nuclear holocaust. The survivors live within a domed city sealed off from the outside world, where the citizens live in a society where everyday is nothing but pleasure. But there is one catch, due to population control and limited resources, all citizens can live until they 30 years old. When they reach that age, they´re taken to a ceremony called the “death carousel”.
This TV series portrayed a futuristic and dystopian society where citizens are only allowed to live until age 30. Logan is 26 years old and he decides to try to escape to freedom, to a mythical place called ‘Sanctuary.’