How to modify existing language's language code?
I'm not sure if this will work, so BACK UP YOUR DATABASE FIRST, but I think that you should be able to run the following query to change fix it:

Let's say for example you were wanting to use Japanese. The language code is 'ja', but people often mistake it as 'jp'. If this was your case, and you wanted to change 'jp' => 'ja', you can run the following query:

UPDATE locales_target SET language = 'ja' WHERE language = 'jp'


Then clear your cache.

If this doesn't work, return your database to its previous state using the backup you took at the start (because you took a backup, right?!)