I'm a bit confused. If there is dirt on the sensors why not clean them off with air or soft paint brush. If sensors are sealed they shouldn't be dirty. I'd look to eliminate the easy fixes first. Your brakes could be fine, but if no brake lights that is telltale on the issue of the brake light switch and failure there throws the same lights. Check your brake lights when the dash lights go on.
What I am saying is that the mechanic says the brakes are fine. There is something, however, that is making the sensors trip that is not a problem with the brakes themselves. He said could be dirt or a bunch of other things. The sensors reset on restart. He told me not to worry about it unless the sensor trips again when you start the car and keeps on doing it. At that point it is time to replace the sensors. Again, nothing wrong with the brakes, just the stupid sensors. Mucho $$ to replace.