Could Moshiach come at any time in any generation?
Yes. In every generation there is a person who potentially could be the Moshiach. When G–d decides the time has arrived, He will bestow upon that individual the necessary powers for him to precipitate that redemption.
Any potential Moshiach must be a direct descendant of King David as well as erudite in Torah learning. It should be noted that many people living today can trace their lineage back to King David. The Chief Rabbi of Prague in the 16th Century, Rabbi Yehuda Loew (the Maharal), had a family tree that traced him back to the Davidic dynasty. Consequently, any direct descendant of the Maharal is of Davidic descent.
Maimonides, a great Jewish philosopher and codifier of the 12th Century, rules that if we recognise a human being who possesses the superlative qualities ascribed to Moshiach we may presume that he is the potential Moshiach. If this individual actually succeeds in rebuilding the Temple and gathering in the exiles then he is the Moshiach.