The problem is not colliding UUIDs, it is a race condition between getting the list of IPs and then writing them to redis.
But anyway, as the other comment mentions, there is some transaction support http://redis.io/topics/transactions
I'm not sure how much Redis will focus on transactions but if it doesn't you're out of luck or reinvent the SQL wheel on top of it.