That depends a lot on how they were stored and which specific variety of hops they are. They definitely will go bad over time and some varieties have better storage properties than others. I have never used hops that were 2 years old before, but if they were stored in an oxygen barrier bag in a freezer they may possibly still be usable if they're a variety of hop that has good storage properties.