How effective is 35 percent carbamide peroxide when used only for 40 minutes (2x20) in two consecutive visits to the dentist? I don't see much effect.

Teeth whitening. Every individual's teeth whiten differently. You cannot predict the efficacy of whitening products( 35% carbamide peroxide in your case) as they have different effect on different teeth. If you didn't see much difference in two sessions, you probably need to do more to get better results. Discuss with your dentist for options.
You might need more. Different enamel types allow different amount of gel to pass thru. If your enamel has smaller pores, then you might need more visits to achieve your ideal shade.
Bleaching Teeth. Not very. Whitening is % strength and time dependent. A lot of dentists feel that it can be improved with light, heat, or laser. My experience is the most profound effect is with trays. Takes more time, but you can control the exposure time and the % carbamide peroxide.
Individual variance. This varies from patient to patient depending upon the actual shade of the teeth, the materials used, and the method. Personally, i prefer the take home whitening gel with custom trays. Doing that, you can continue to use the whitening trays for as long as necessary (for the same cost). Sometimes both methods are combined for better results. Discuss this with your own dentist.