At a previous job we also had the rule that the screen had to be locked (usually done by pressing Win+L).
However, there was no pizza; instead, the computer was used to send mass e-mails to colleagues. The topics of the e-mails was as varied as the imaginations of people:
- invitations to various events;
- invitations to various celebrations at the desk of the not locked computer;
- selling of expensive items for very low prices, providing whatever reasons;
- etc etc
Many times, the content of the e-mail was the result of team-work.
The only limit was that the messages should use a decent language and not be (very) offensive. Also, I have never heard of e-mails sent in order to really harm the forgetful person (e.g. termination notice, offensive language to bosses or cutomers...).
The easiest and cheapest method is to just use Win+L. After you buy pizza for everybody for a few times, and have to endure their jokes / sarcasm at the same time, you will never forget to lock it again.
It is like learning to not pee in the bed during the night. It happens a few times, until you get it right.
For a technical solution, the sky is the limit.
As an (impractical) joke, you may want to have a look at the OMGWTF and the winners.
Example: configure the screensaver to kick in and lock the screen after ~ 5 seconds of inactivity (that is roughly the time you need to stand up and walk away, before any colleague has a chance to start typing without you noticing). It will create some trouble for you also, but you are sure that the computer will never remain unlocked. No additional software, hardware or work required - besides moving the mouse and hitting buttons on the keyboard. At the same time, you will become the most productive employee in the company. :)
On a more serious note, the purpose of that rule is to make people more aware of the security needs, and the need of them being involved in the process. Usually, locking the screen is the least one can do towards security, even before choosing good passwords - screen not locked, password not needed at all.
If one fails to do even that (lock the computer screen when the computer remains unattended), then there is a big chance that the other security rules are not followed either.