db: added method update_batch_safe()