In < 9.4.x, you cannot easily get a list of the header values for multiple instances of the same header. I think you'd have to iteratively save each Set-Cookie header value, modify it, and remove it. Once all the cookie headers have been removed, you could add back the modified versions.
Is there any chance of modifying the application to not set this cookie option?
I'll see about testing this to confirm you'd need to remove them and then come up with an example. Irrespective of this, you should consider upgrading at least to the latest maintenance release, 9.3.x now, or once 9.5 is released.
Aaron