What would happen if flaps are extended beyond 40 degrees? The angle of flaps is limited to a specific value. It's around 30° to 40° on most aircraft what I've seen.


Source

But what happens when they get extended even further? 50°, 80°, 90°, ...
Let's also say they don't break due to high load on them. I just want to know it theoretically.
What will happen to the plane? 


Will drag be increased? 
At which point will the aircraft loose it's lift due to the extreme deformation of the wing? 
What about the slats?
Are there any aircraft that use a higher than usual angle of flaps?
Depends on the kinda of flaps installed on the aircraft; in the example above with fowler flaps, the design would begin to just create excessive drag without gainful lift and would require a pretty bulky structure to accommodate for the aerodynamic loads imposed upon them.

Now some other types of flaps like the split flaps or dive brakes like those found on the Spitfire fighter were designed to extend 90°.