You were able to vote 34 times because you voted on 4 questions, and 30 answers. You can vote 40 times if you vote at least 10 questions; for example, if you vote 5 questions, 15 answers, 5 questions, and 15 answers (in this order), then you can vote 40 times.
Once you get the warning about still having 5 votes, that is the number of votes you can still cast.
So, what is the reason?
The reason is pushing to vote more questions. I guess that there are very good questions that are put on the same level (as for votes) to worse questions, and they want good questions stands out from the bad questions.
The fact more than a quarter of your votes were for questions doesn't influence the purpose of the extra votes, as the extra votes are for pushing to vote questions always, not in a defined timeframe. There are always new questions, and there is always the problem to make good questions stand out. That is also the reason down-votes on questions don't cost reputation to the down-voter.
Should I refrain from up-voting good answers early in the day, just in case I run into a lot of bad questions late at might?
You should not change your voting behavior; you just vote as you already do, keeping in mind that if you vote 10 questions, your limit is not 30 votes per UTC day. There is nothing that says you have to vote 40 times each day, and if that doesn't happen, nobody will say anything.
Refraining to vote a good answer because there could be very bad question to be down-voted doesn't make sense, as you can still down-vote that question the day after. Following that reasoning, you would not vote any posts, because there could be a better post that needs an up-vote, or a worse post that needs a down-vote; you should probably vote in the 5 minutes before midnight UTC, being sure of reading all the posts, to be able to vote for the best, or the worst post.
Could we perhaps have an exception for users who have already spent way over 25% of the votes on questions?
If you mean that users who gave at least a quarter of their votes to questions should be free to vote 40 posts, then I don't agree with that.
The purpose of the extra votes is to resolve a problem that there exists until new questions are asked. It doesn't try to push people to use at least a quarter of their votes for questions, but to increase the votes on questions. In the front page, what you see is a list of questions, and seeing a good question having the same score of a bad question is not something that helps about the quality of the site; it is like saying that the site accepts both good, and bad questions, while users should understand that bad questions are not encouraged.