It is quite easy to prevent this.

When your program starts, generate a Random Number, store it in a Static variable and then use KeyChk Function 3 to store it to a specific offset in your Key's User-Data.

Throughout your program's operation, you can use KeyChk Function 1 to check the Key's User-Data to ensure that the random number is the same.

If another computer is also running your program during this period, and using the same Key (via a Port-Sharing Device), a different Random Number will have been written to the User-Data.