<?php
$_POST = [
"ambiente" => "",
"logotipo" => "Novo logotipo",
"certificado" => "",
"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;
PD9waHAKCiRfUE9TVCA9IFsKICAgICJhbWJpZW50ZSIgPT4gIiIsCiAgICAibG9nb3RpcG8iID0+ICJOb3ZvIGxvZ290aXBvIiwKICAgICJjZXJ0aWZpY2FkbyIgPT4gIiIsCiAgICAic2VuaGEiID0+ICIiCl07CgokaWQgPSAxOwoKJGRhdGEgPSBhcnJheV9maWx0ZXIoJF9QT1NUKTsKCiRmaWVsZHMgPSBhcnJheV9tYXAoZnVuY3Rpb24gKCR2YWx1ZSwgJGtleSkgewogICAgcmV0dXJuIHNwcmludGYoImAlc2A9JyVzJyIsICRrZXksICR2YWx1ZSk7Cn0sICRkYXRhLCBhcnJheV9rZXlzKCRkYXRhKSk7CgokcXVlcnkgPSBzcHJpbnRmKCJVUERBVEUgYHRhYmVsYWAgU0VUICVzIFdIRVJFIGBpZGA9JWQiLCBpbXBsb2RlKCIsIiwgJGZpZWxkcyksICRpZCk7CgplY2hvICRxdWVyeSwgUEhQX0VPTDs=