You can use double foreach loop and than break immediately after you find the first value like this:
foreach($data as $key1 => $value1){
foreach($data[$key1] as $key2 => $value2){
$data[$key1][$key2] = $your_new_value;
break 2;
}
}
The 2 after the break statement means that you break out of both loops at the same time. Alternatively you can use array_keys which returns the keys of an array like this.
$key1 = array_keys($data)[0];
$key2 = array_keys($data[$key1])[0];
$data[$key1][$key2] = $your_new_value;
array_keys returns an array so the [0] at the end of the line means the first element of that array, because the first element of that array is usually the first key.