mustard seed refers to the meaning of a grain of mustard; it is equivalent to saying: 'If there were a grain of mustard, it would be in a rock.'
Yahya said: It has reached us that it is the rock upon which the whale rests, which in turn carries the stability of the earth. (Or in the heavens or in the earth, Allah will bring it forth), meaning: Beware, for He will record your deeds for you and know them, just as He knew this grain of mustard. (Verily, Allah is Subtle) in bringing it forth (All-Aware) of its location.
Surah Luqman from (verse 17 to verse 19).