I have never done a MR to CUN, but have been through the airport quite a few times. As mentioned, once you get off the AA plane you are funneled into the immigration line. I don't believe that you can reach the terminal without clearing customs and immigration and getting re-screened through security.
If you are doing the MR on a Friday, Saturday or Sunday, you may have a tough time getting back to the gate in 50 minutes. Things that will help your cause are having your return BPs, no luggage, and getting out of the plane first.