If two people try to start a session at exactly the same time, two open sessions can be created. Take an exclusive lock on the sessions table during session creation to prevent this.