It depends on the OS, however normally a PID will only be unique for as long as that process is running.
That is, as long as your process is running no other process will be given a PID the same as your process, however as soon as a process has terminated another process can (and most likely will eventually) be given the same PID.