Electric Dryer with possible wrong Cord
No, it's not particularly safe. But it's not about the 50A/30A plug/receptacle, it's about the 3-Prong 240VAC plug/receptacle. Those have been known to be a poor design choice for 40-odd years and have been outlawed (other than &quot;grandfathered&quot; installations which are allowed to remain until remodeling or the like forces change) for more than 20 years in code.
Why are they bad? This plug configuration (the NEMA 10-50 for 50A ranges, or 10-30 for 30A dryers) has no grounding terminal, and neutral ends up connected to the case of the appliance. The modern replacement (NEMA 14-50 and NEMA 14-30) has 4 terminals, with both a grounding terminal and a neutral terminal as well as the two hot terminals. For the 10-30, one problem can lead to an energized case (the outside of the dryer goes to 120VAC) while the 14-30 requires TWO problems at the same time to reach that point.
There are other 3-prong 240VAC plug/receptacles that are hot, hot, ground, and those are OK, but ranges and dryers in the US have typically used some 120VAC components, so those plugs won't work for them.
If your dryer outlet box has 4 wires, you would simply replace the incorrect 10-50R with a 14-30R and then replace the cord on your dryer with a 14-30P cord, following your dryer's instructions to remove the jumper that bonds the case to neutral with a NEMA 10 cord. If your dryer outlet box only has 3 wires (and is not wired via conduit that would provide a ground path) you have to choose whether to continue living dangerously with a NEMA 10 outlet (if you are merely moving the dryer, not remodeling) or to retrofit a ground wire to that box and install a 14-30R.