A distinction needs to be made between quickly obtaining an issued patent versus quickly filing a patent application. The kind of protection offered by an issued patent is different from a pending patent application
If you do sell your product before filing a patent, the act of selling starts a one year time clock within which you have to file a patent application. If you do not file within one year, you will be barred from later filing a patent application.
An expired patent does not give one the right to file a patent application that is identical to the expired patent.
A design patent must be new and not obvious in order to be valid. This is the same for utility patents.