Kellogg v National Biscuit Co is the foundation for the functionality doctrine. Essentially, this ruling means that product designs that are intrinsic to functionality cannot be protected under unfair competition or trademark laws.
The expiration of the patent term has no bearing on this--at no point can a trademark claim be made on these functional designs, even during the patent term, or if no patent exists or has been applied for. (However, if there is a valid patent covering the functional design, the patent owner can exclude others from using that design based on their patent rights.)