There are two general categories to consider for deciding who should write letters of recommendation: the recommenders familiarity with you, and their standing in the field. In this case, those two criteria may be in conflict.
As you have described it, the standing of your masters faculty leaves something to be desired, conceivably being people who do not have tenure, and may not even be in tenure-track positions (as it is unclear what you mean when you say someone is a lecturer, which I realize in United Kingdom may sometimes be the same as a Assistant Professor). While these letters of recommendation are not worthless, they certainly won't go as far as a letter of recommendation from somebody who can more reasonably evaluate you in comparison to other people in the field, and whom people in the field have reason to believe will make that evaluation correctly.
On the other hand, the professors who have advised you as an undergraduate may be less familiar with your work, and therefore less able to write a good letter of recommendation. Importantly, your graduate work may have been at a much higher level of proficiency then your undergraduate work, meaning that the letters of recommendation that your undergraduate professors could write for you would not reflect your more advanced standing in the field.
In this situation, the most important consideration is how good of a letter of recommendation can your thesis advisor right for you? If your thesis advisor can reasonably cover the work that you have done in your masters program, that inclines towards letting your other two letters be tenured professors from your undergraduate institution.
A secondary consideration, however, is how long ago you attended your undergraduate institution, and how long your masters program has been. If you went straight through after undergraduate, and you are essentially only one or two years removed then other than your education, little has changed and your undergraduate faculty is likely to be able to write accurate and helpful letters of recommendation. On the other hand, if you have taken several years off and returned to school, then a lot about you has changed and should be reflected in your letters, and your undergraduate faculty does not know you nearly as well. As a rule of thumb, more than five years without significant contact is too long for a letter of recommendation, but your mileage may vary.