Stir together the coarse sea salt, granulated sugar, and extra lime zest for garnish; rub the zest into the salt and sugar with your fingertips until fragrant. Spread on a small plate to dry slightly.
Heat the oven to 350°F. Line two 12-cup muffin tins with paper liners.
In a large bowl, whisk the cake mix with the kosher salt, 1 tbsp lime zest, and orange zest to evenly distribute the citrus oils.
In a separate bowl or large measuring jug, whisk the eggs, margarita mix, vegetable oil, and vanilla until smooth and slightly frothy.
Pour the wet mixture into the dry ingredients and stir with a spatula just until no dry pockets remain. Let the batter rest for 5 minutes to hydrate and thicken.
Scoop the batter into liners, filling each about two-thirds full. Bake 17–20 minutes, rotating the pans halfway through, until the tops spring back and a toothpick comes out clean or with a few moist crumbs.
Cool in the tins for 10 minutes, then transfer cupcakes to a rack and cool completely before frosting.
Make the frosting: Beat the softened butter on medium speed for 1 minute until creamy. Add about half the powdered sugar and beat on low until incorporated. In a small cup, combine tequila, lime juice, and 1 tsp lime zest.
With the mixer running, drizzle in half of the tequila–lime mixture, then add the remaining powdered sugar. Beat on medium-high for 2 minutes. Add the remaining tequila–lime mixture and the pinch of fine salt; whip 1 more minute until light and fluffy. If the frosting seems soft, chill it for 10 minutes before using.
Frost the cooled cupcakes with a piping bag or an offset spatula. Immediately dip just the outer edge of the frosting into the salt–sugar–zest mixture to create a cupcake “salt rim,” or lightly sprinkle it over the top. Serve at room temperature.