Kevin,
Not that I am an expert in python but looking at the help file for Calculate Field the syntax is:
CalculateField_management (in_table, field, expression, {expression_type}, {code_block})
so if uniqueid is a variable have you tried:
arcpy.CalculateField_management("in_memory/buffer", "GP_ID",uniqueid,"PYTHON")
or if uniqueid is a field name
arcpy.CalculateField_management("in_memory/buffer", "GP_ID", "!uniqueid!","PYTHON")
Regards
Anthony