NXP-14594: When a duplicates constraint error is catch, the insert statement is stopped so only a portion of user cache is updated, fixing by using a where clause