Improve event locking

Avoid overwriting existing locks