My mentor during my master's degree was a PhD student. Does this lower my chances to get a PhD position in good universities?
It is important here to distinguish between what is on paper and what is the day-to-day reality. 

As other have mentioned already, it is common for masters students to be supervised on a daily basis by a PhD student. However, I have never heard of a PhD student being a formal supervisor for a masters student. I very much doubt that this is your case, but stranger things have happened. 

What is far more common is that you are accepted for masters work at a lab/department/research group etc and the main supervisor (at least on paper) is the group leader. Then s/he may delegate the day-to-day supervision to a PhD student who is (hopefully) knowledgeable in your field. This is especially common if the group leader has a large group with many grad students, collaborations and possibly even administrative duties. None of this is of any detrimental impact to your chances to being accepted as a PhD student later down the line. 

If you are in doubt, ask yourself the following questions:


who advertised the position?
who did I have to contact to be accepted to this position?
whose name will be on the first page of the thesis as a supervisor, once the thesis is formally written?
who is paying for the direct or indirect costs of my research?


If the PhD student tutoring you is the answer to all those questions, which I again doubt very much, then it may very well be so that people look at your future application with some hesitation, probably due to how uncommon and somewhat unrealistic this is. 

There is however the possibility, if you are doing your masters at a company, that your formal supervisor is a PhD student, who also happens to be doing research at the company. But even then I would probably argue that formally there is a professor at some affiliated university or research institute who's the actual supervisor, at least on paper.