It depends. I have GPUs mining fine from 2017 when I bought them new (RX 570/580). I also have ever older GPUs like R9 290 and HD7950 that I bought second hand and they mines well too.
The conclusion is they can mine until they arn't profitable anymore. If your question is when they arn't profitable anymore, that's a harder question to answer. As I said above I still mine with HD7950s that are made in 2013, and they are still profitable, but it's crazy times right now. In 2019 GPUs bought in 2017 wasn't profitable
