Yea, quoting the statute isn't very useful because the Navy is often more restrictive than that.
Also, there are many flag/general officers at or over the age of 55, including the Army Chief of Staff, Chairman of the CJS, and the Commandant of the Marine Corps. In the current peacetime military, it's really hard to make it that far in under 30 years.
Someone posted on another board that the attrition rate for officers who begin their careers over 27 is much, much higher than those who start under, which is why the Navy caps its age limits lower than statute. I don't have the link to that data, though.
Again, there's a CRNC instruction out there that covers this. When I applied in '08, it was 29 waiverable to 31 with prior service. It may have changed, may not, but last I heard most ORs aren't having much trouble meeting nuke quotas recently.