Pick a random value, calculate if it is a prime number, if it isnt, add 1, and repeat until you get a prime number(or until you get to the highest 32 bit value, if thats the case, go back to your value, substract 1, calculate, and repeat until you get a prime number)
Or write all prime numbers into an array, and pick a random one