There is a good discussion of locking and DB_File here. You may want to use the built-in locking in the newer BerkeleyDB module instead, as it will scale better for multiple users.
yeah.. but that has to be compiled onto the system. So if i were to install this on someone elses system. They would have to install and compile BerkleyDB and the entire Berkley Database