If you are using builtin zip tax rate feature and have source you can modify the code to handle this. The 1st option is if you only ship the US then check the length of the zipecode before the loop and make zipcode value substring . If you do ship to other countires then add check by countryid is if the country is the us and then make the zipcode value a substring.
The basics of the if statment that just logic for the length would be
if (ZipCode.Length > 5)
ZipCode = ZipCode.Substring(0, 5);