The passport has expired 2 years ago. I want to travel by plane on a direct flight from Lisbon to Austria. I might not be able to get a new passport from my embassy on time (I'm a resident in Portugal). The only other document I have is an Austrian divers license.
Given that both Portugal and Austria are part of the Schengen zone the flight you're taking is actually "domestic" rather then international, so there is no requirement to have a valid passport since you're not crossing any borders either outbound or inbound.
To be more specific according to Star Alliance Timatic you can enter Austria on an expired passport if it's expired within the last 5 years. With the exemption of: