<?php
$_POST = [
"ambiente" => "Novo ambiente",
"logotipo" => "",
"certificado" => "",
"senha" => "Nova senha"
];
$id = 1;
$fields = array_map(function ($value, $key) { return sprintf("`%s`='%s'", $key, $value);
$query = sprintf("UPDATE `tabela` SET %s WHERE `id`=%d", implode(",", $fields), $id);
echo $query, PHP_EOL;
PD9waHAKCiRfUE9TVCA9IFsKICAgICJhbWJpZW50ZSIgPT4gIk5vdm8gYW1iaWVudGUiLAogICAgImxvZ290aXBvIiA9PiAiIiwKICAgICJjZXJ0aWZpY2FkbyIgPT4gIiIsCiAgICAic2VuaGEiID0+ICJOb3ZhIHNlbmhhIgpdOwoKJGlkID0gMTsKCiRkYXRhID0gYXJyYXlfZmlsdGVyKCRfUE9TVCk7CgokZmllbGRzID0gYXJyYXlfbWFwKGZ1bmN0aW9uICgkdmFsdWUsICRrZXkpIHsKICAgIHJldHVybiBzcHJpbnRmKCJgJXNgPSclcyciLCAka2V5LCAkdmFsdWUpOwp9LCAkZGF0YSwgYXJyYXlfa2V5cygkZGF0YSkpOwoKJHF1ZXJ5ID0gc3ByaW50ZigiVVBEQVRFIGB0YWJlbGFgIFNFVCAlcyBXSEVSRSBgaWRgPSVkIiwgaW1wbG9kZSgiLCIsICRmaWVsZHMpLCAkaWQpOwoKZWNobyAkcXVlcnksIFBIUF9FT0w7