How do you change the lock on a 1990 Toyota Corrolla driver's door where the key will not operate this lock but works fine on the passenger door ignition and trunk?

On my 1992 Toyota Corolla, the key stopped opening the trunk lid but worked on the doors. I went to a locksmith to get the trunk opened. He made a new key that then worked on all the locks. He said that a worn key may fail to open only one of the locks on a car.