Exactly. In the musical Joe says to Norma "Nothing's wrong with being fifty unless you're acting twenty.
In both the film and musical, the story very specifically takes place in 1948 because Cecil De Mille is filming scenes from his upcoming Biblical epic Samson and Delilah, which finished shooting in December of that year. De Mille was 67 years old at that time and states at one point regarding Norma's age "I could be her father." De Mille's eldest child in 1948 was 40 years old.
Billy Wilder, before casting Gloria Swanson, offered the role to both Greta Garbo and Norma Shearer both of whom would have been in their late 40's when filming began.