Personally, I like to roll my own at least the first time around. Mainly, I do this for the educational value of trial and error and then comparing what I came up with to the
ways of doing it. Here how I do it:
Before storing the session id in MySQL, I confirm that it is unique. To date this has never returned a duplicate id.