It sounds to be Sebaceous cyst.
It is a swollen, blocked grease gland and occur on side or middle of penis shaft. It forms from proliferation of epidermal cells within the dermis. It is a swollen, blocked grease glands which occur on middle of penis shaft.
Sebaceous cysts are very common and generally of no consequence. The material in the cysts is a thick white substance that resembles toothpaste (in color & consistency but not in odor).
It is not an STD, and would not be transferred to your partner.
Yes, you can go for sex, with your partner after one week.
Yes, you should continue use of Mupirocin cream on affected part for 1 week.
I would suggest, that you should stay away from sex, for one week, till you are using this cream and then after this time, you can have sex.
I hope this helps.
If there’s more I can do, please use the reply tab and let me know how I can be of further assistance.
My goal is to provide you with excellent service – if you feel you have gotten anything less, please reply back, I am happy to address follow-up questions. Thank you for your business