Robert Lewandowski scored twice and Thomas Müller had a hand in four goals as Bayern Munich returned to winning ways with an entertaining 5-2 win at Union Berlin.