In an 8-inch nonstick skillet over medium heat, cook the bacon until crisp, about 5 minutes. Tear in half and set aside.
Into the same skillet, add the brown sugar, onions and 1 tablespoon of the butter. Cook, stirring as needed, until the onions are golden, about 5 minutes. Transfer to a plate and set aside.
Build the grilled cheese by spreading one piece of bread with the mayonnaise. Sprinkle half of the grated cheese on top, followed by the onions. Place the apple slices and bacon on top of the onions, then add the rest of the cheese. Spread the other slice of bread with the mustard and put it mustard-side down on top of the cheese. Spread the outside of the top bread slice with 1 tablespoon butter.
Transfer the sandwich to the skillet over medium-low heat, butter-side down. Spread the top of the sandwich with the remaining tablespoon butter. Toast each side of the sandwich until golden on the outside and the cheese is melted, 3 to 4 minutes per side. Cut in half and serve.