You are unlikely to feel a major shock.
When you touch a metal object and get a shock, you are essentially shorting two capacitors: yourself, and the object you touched. The charge exchange that takes place is proportional to the capacitance of the smaller object (assuming it is much smaller than yours), in addition to the potential difference between you and the object. A metal button itself has a tiny, tiny capacitance, likely quite a bit less than 1 pF (this can depend on whether the phone has a metal case, etc.). Consequently, even if you had not been holding the phone, you probably would not feel a significant shock by touching the button (feel free to chime in if you have had experiences to the contrary).
Secondly, insulators do not have infinite resistance. They can slowly leak charge, especially if there is a high voltage across them (high enough to cause a shock). While you are holding the phone, the potentials of the phone and yourself slowly equalize as charge is transferred through the insulating parts. This process takes a few $RC$ to complete, where $C$ is the capacitance of the button, and $R$ is the equivalent resistance the button and your hand.
For an estimate, let's take the resistivity of the phone case case to be that of hard rubber, equal to ${\sim}10^{13}\text{ }\Omega \text{·m}$. Taking the dimensions of the case to be 150 mm × 75 mm, with a thickness of 1 mm, we calculate a resistance of $R\approx10^{12}~\Omega$. If we also take $C \approx 1\text{ pF}$, $RC\approx 1\text{ s}$, so it only takes a few seconds of holding the phone for the potentials to equalize (the exact discharge time will naturally vary considerably depending on the materials and construction). After that, you will not feel a shock by touching the button.
If you do have a phone with an exposed metal button (and a carpet), feel free to experiment and report back.