in reply to Should I lock this DBM File?

Indeed, dbmopen() et al. are remnants of antiquity.

As to the question, "should I lock", the answer is Yes, with the caveat that you're only protected against other scripts that play by the same rules.

One hint: If at first you don't get the lock, don't just die. Instead, retry a few times after a short sleep() or select() induced delay. Your script doesn't hold the lock for long, so if a different instance of the script beats you to the lock, chances are good that you'll get it after a short wait.