The above looks like a subset of what printenv returns in u-boot. To set it the equivalent incantation would be:
setenv media_addr_r '0x4001000000' setenv media_img 'mp30ar0_tianocore_media.img' setenb spi_load=tftp '${media_addr_r} ${user_dir}/${media_img}' setenv spi_update=sf 'probe 0; sf erase 0x0 ${filesize}; sf write
${media_addr_r} 0x0 ${filesize}'
Just a note that it's likely that these env variables are already there, except for media_img. In which case, you just need to
setenv media_img 'mp30ar0_tianocore_media.img'
and should not change others, such as media_addr_r.
-Phong