Non-numbers matching absolutely kills the car's value, so if it is matching numbers, do this. Now the motor having the proper numbers on it's rare even in a 340 car with 340, even one with Xes.
Whatever you sell it for is not as much as the value your car will lose after you put a different engine in it. I am guessing you will devalue the car by about 10k.