In a microwave-safe mug or bowl, melt the butter in the microwave for about 30 seconds. Swirl the melted butter to coat the inside of the mug. Add the flour, cocoa powder, baking powder, milk, brown sugar, egg, and vanilla to the mug and whisk until the batter is smooth. Push two of the caramels down into the batter and make sure the batter covers them. Microwave on high power for 90 seconds.
Cut the remaining caramel in half, place on top of the cake and sprinkle with some sea salt. Microwave for another minute or until the cake is firm and the caramel on top has softened and starts to melt.