Now you have maybe learned the lesson to always backup?
So you haven't successfully finished the upgrade yet, right?
Lets maybe go step by step to try to successfully upgrade to 2.4.0 and then we will see what's then happening with DOI and CrossRef plug-in?
First, please backup everything!
It seems like there would be a duplicate entry in your event_log_settings DB table. I think, the same log_id and the setting_name could exist more than one time. Could you check for that? I think you can delete one of the duplicate rows. Then start the DB upgrade again.