The Air Force now authorizes the use of the highest Air Force Officer Qualifying Test composite scores from any AFOQT administration (also known as the 'AFOQT Super Score'). For instance, if your initial Combat Systems Officer (CSO) composite score was 90 and your subsequent CSO composite score was a 79 - the 90 would be recognized as your official score. Have a look at the Air Force Guidance Memorandum (AFGM) to AFMAN 36-2664, Personnel Assessment Program to read the official update.
You are still authorized to take the AFOQT twice. In rare circumstances the Air Force does allow individuals to test a third time, however a waiver is required. Prior to March 2021, the Air Force only considered your most recent AFOQT composite scores. If you decided to take the test a second time and failed to improve your scores, you were stuck with the second-place results. This is no longer the case.
Note: If you take the AFOQT and your scores just meet the minimum requirements*: P50/N50/Q50/V50/AA50, focus on ensuring the rest of your package (e.g., letters of recommendation, resume, personal statement, interview, gpa) is superb. Remember: The Air Force emphasizes the whole package concept!