i got the answer, you should have to use below code to update customer custom attribute
$customAttributeValues=array("attributeCode" => "mobilenumber", "value" => "918985552230");
$customerData = [
'customer' => [
'id' => 5,
"email" => "test@example.com",
"firstname" => "Magecomp",
"lastname" => "Tester",
"storeId" => 1,
"websiteId" => 1,
"customAttributes" => [$customAttributeValues],
]
];
$ch = curl_init("http://127.0.0.1/m232/rest/V1/customers/5");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($customerData));
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: application/json", "Authorization: Bearer " . json_decode($token)));
$result = curl_exec($ch);