I have found it depends on the brand and colour/type. I bought a bargain Nails Inc set in TK Maxx but the polish consistency had gone weird & didn't set properly - the set would have been out about 2 years previously.
On the other hand I have bottles (which have been opened occasionally) that are 5+ years old that are fine to still use (Leighton Denny, OPI, Nails Inc), but it can vary a bit.
Old polish will tend to separate in the bottle, but shaking it usually sorts that out.