`LOCK_EX` flag should be used.