There is no time limit on written test endorsements in 61.35. If you haven't failed the test since the endorsement was given, you could take or retake the test years later. However...
The FAA has a penchant for changing and adding questions every year or sooner. If you haven't trained on the latest material the test covers, you could be in for an unpleasant surprise -- especially on the IR test to which the FAA added a bunch of questions on GPS and icing (including de-icing systems) earlier this year without fanfare. This bit a lot of people using older training materials which weren't updated. For that reason, if it's been more than a couple of months since your endorsement, even if you don't need a new endorsement, consultation with an instructor active in written test training for that particular certificate/rating would be a really good idea.