It says “up to 3 years” and includes wording to that effect (“Störung des öffentlichen Friedens”). Also, that’s how it’s applied, just from personal experience living here :)
That’s not really true. Religion is being made fun of all the time without a problem. The maximum sentence of 3 years might be applied if you e.g. try to incite a riot by setting Qurans on fire, but probably not even then