Addressed concerns commented on the pull request

Changed ObjectLock to have a unique_together option which raises an
IntegrityError if table and object_id (together) already exists in the
database. Removed the key field.

Wrapped the ObjectLock creation in a try/except IntegrityError to
prevent a race-condition from blowing up one thread when two are trying
to lock the same record at the same time.