use new lock context manager to acquire locks while cleaning up stale ones
break lock immediately if it is too old and use warning when breaking it