It is not possible to update an existing file.
You will need to read the file you want to edit and create a new archive including the file that you edited and the other files that were originally present in the original archive.
Below are some of the questions that might help.
Delete file from zipfile with the ZipFile Module
overwriting file in ziparchive
How do I delete or replace a file in a zip archive