I think you are not passing the id of the record. If you don't pass it will say that the record doesn't have an id, i.e it will create a new record and will not update the one that already exists.
As Muhammed Riyas said, please share an OML if possible, that way it will be possible to know what is really happening.
Kind Regards,
Márcio