You can remove everything in /tmp when you reboot.
When the system is running, don't do it. You mentionned those "lock" file:
When certain programs start, they write a program.lock file (or sometimes folder) in /tmp. So that if you try to start a 2nd instance the same program, it will notice that there is a lock file in /tmp so will refuse to start. When you cleanly close the program the lock file is removed.
This can be useful to know if you kill a process and then cannot restart the program. It might be because you need to manually remove the lock file in /tmp.
If you still afraid about removing everthing in /tmp during a reboot, make a copy of /tmp somewhere. Once you'll see it's safe you can delete you backup.
Hope this help