It's possible, but complicated, to edit a log on a locked cache. Or to even log a find - if you have a good enough reason.
You would need to contact a reviewer (the one who locked it would be a good start) or the Groundspeak help center and explain what you needed to do and why. As with most requests for exception to policy, the more details you give, the greater your chance of approval. Also, be patient - there are only so many reviewers and lackeys, and they get a lot of requests from a lot of geocachers.
If approved, you'll likely get a time window to make the changes before the cache is locked again.