Fix for SPR-12327

The problem is in < which locks the whole table and doesn't allow even simple select against it and another delete/insert.