This is by design. Here's clarification:

CASE A:

1. Process 1 executes console action.
2. Process 1 creates lock.
3. Process 1 runs critical section code.
4. Process 2 executes console action.
5. Process 2 tries to create lock, gets false, fails and immediately exits.
6. Process 1 releases lock and exits.
7. Process 2 tries to create lock and successes.
8. Process 2 runs code, releases lock and exist.

CASE B:

1. Process 1 executes console action.
2. Process 1 creates lock.
3. Process 1 runs critical section.
4. Process 2 executes console action.
5. Process 2 tries to create lock, gets false, fails and immediately exits.
6. Process 1 hanged (exception, error or whatever happened).
7. Process 2 tries to create lock and fails.
8. Time passes.
9. Process 2 tries to create lock and successes.

Note that both processes are executed by cron.