Well done! Remember that a lot of guys would prefer to use the cubicle than stand next to someone. So if you go in and there is someone at a urinal already, feel free to use the cubicle, and don't hide the fact that you are there for a pee.
As for being side by side who someone you know, a conversation does get rid of the artificiality of silence. Just ask an open question to get him talking.
You survived both events, which means you can go into a similar event with a little less anxiety, so bit by bit develop some confidence. And take as long as you need; there is no time limit :-)