The query is not valid. Please use the below. At any rate I don't suggest using CB Queries wherein CB Fields can accomplish this much simpler.
Code:
UPDATE `#__comprofiler` SET `avatar` = 'avatars/avf.png' WHERE `id` = [user_id]
It not displaying I can't advise on. The avatar supplied must be a valid path. Typically avatars are stored in the below location.
images/comprofiler/
Placing the image there then changing the fields value simply to "avf.png" would accomplish your needs, but users could easily delete it. The best approach is to have your image be a Gallery image and enable display of the gallery images. You'd then place the image at the below location.
images/comprofiler/gallery/
Once done you'd change the users field value to "gallery/avf.png".