Not an expert here, but I know folks who were still flying as Colonels. There was a documentary recently with General Harrigan, he is 4 star and he still flies the F-22. So there are exceptions. The problem with flying as you get older is passing med/qual. Most pilots I know who stopped flying before retirement went out on med/disqual.