These situations are never easy. Your boyfriend will naturally be devastated and upset by the news - that is a normal reaction. Anyone would be heartbroken, frightened and upset by the news of their loved one possibly not having many more years left with them.
That being said, I do think you need to sit down and have an open, honest discussion with him about this. He definitely needs to know so he can be prepared. Start by letting him know that you were born with the rare condition. Then explain that your cardiologist has determined that this is a rather severe case and your life expectancy may not go past early 30s. You may not have long left, but at least if you both know, you can make every moment count and cherish every second you do have together.
Maybe you could go to another cardiologist and get a second opinion, research options, etc. Remain hopeful and don't give up. Fight with all your power. If in the end it doesn't work out and you don't end up having as long of a life as you would hope, make sure you've lived a memorable life and left your loved ones with many happy memories to cherish.
I really wish you and your boyfriend the best with your futures and I hope that by some chance, you will be able to live past your 30s.