# lock Table here my $obj_rs = $schema->resultset("Table")->search({ col1 => $val }); my $obj = $obj_rs->next; my $old_val = $obj->col2; my $new_val = maybe_expensive_computation($old_val); $obj->col2($new_val); $obj->update; # ... fetch and update some more rows # unlock Table here