United States currency does not become obsolete when new designs are introduced, according to the United States Department of the Treasury. However, businesses are not required by law to accept any particular form of currency.
In theory, any $20 bill ever produced can still be legally passed in the United States, but businesses may refuse to accept a particularly old bill because they don't recognize the design (and are within their legal rights to do so). Older designs of the $20 bill can still be used so long as it is not counterfeit or too damaged. If the bill is so old that the design is not common, it should be officially appraised for its value as it may be worth more than face value to collectors.