In my experience it is NOT necessary to modify either the UBB file locking or the UBB cookie subroutines to install this hack if you are using a recent UBB release (eg 5.47b or above).
These UBB routines already have the fixes included (which is why the UBB code does not match the instructions in the hack). They include the same fix using different code, so to replace them is to regress the InfoPop code rewrite. No point in doing that.
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.