Based solely on what you've written, I don't see a connection between the fact that your boyfriend kissed you and the fact that your friend was sitting behind you at the time. But, of course, I wasn't there. It could be that your boyfriend said or did other things in that moment that gave you that impression (like turning around and looking pointedly at your friend after the kiss with a "see, she's MINE" smirk on his face).
I would just tell your boyfriend that you are uncomfortable with him kissing you at church. ( I would be, too)
If you see a pattern of Boyfriend acting possessive whenever your friend is around, I would discuss that with him. That would be a separate issue from the "kissing in church" conversation to me, and I would make it about all men in general, in addition to Friend.
I don't know if Friend is actually interested in you or not, but I would tell Boyfriend that yes, other men may be attracted to you and might ask you out while you are dating him, but that doesn't matter because you are dating him exclusively (if that's the case). Explain that it doesn't matter what any other would-be suitors may want, what matters is what You (RiverSong) want.
For some reason, I think some boyfriends/husbands truly have trouble understanding that.