db_update not working as expected
Is that mac address is a required field?
It may be possible mac address passing to this function not getting change, you may need to debug mac address before the function call.