The Gemara in Eruvin (43a) teaches: If one accepts upon himself nezirus, which is set to start on the day Ben Dovid arrives, he is allowed to drink wine on Shabbos and Yom Tov (Rashi explains: As Moshiach isn’t going to come then), however, during the week it’s forbidden for him to drink wine (Rashi explains: As Moshiach may come). The Rambam (Hilchos Nezirus 4:11) rules in accordance with this Gemara. Tosfos asks: If by the case of nozir we are worried that Moshiach may come any day, then why don’t we say the same thing in regard to the Kohanim drinking wine? Why does the Gemara say שתקנתו קלקלתו, it’s been so long, and we are no longer worried. If by the nozir we are worried, we should be worried by the Kohanim as well?
Tosfos answers: There is no prohibition for the Kohen to drink wine, as if Moshiach comes we will find another Kohen, or he can sleep a little bit and sober up from the wine. By the nozir, however, if Moshiach arrives he will have violated his nezirus and there is nothing he can do to rectify it. If Moshiach arrives, the nezirus will start that day, and it will come out that he drank wine on the first day of his nezirus.
The Shu”t Chasam Sofer (6:98) suggest another answer: By the Kohanim we aren’t worried for something which is unlikely to happen, as unfortunately it has already been a very long time. However, by the case of the nozir, he brought himself into the difficult situation, therefore, he must make sure he does all he can to avoid transgressing on his nezirus.