# CalculateField can be a little hard to understand, because you have to pass
# a string that evaluates to a correct Python expression. Biggest pitfall that
# I see on this forum is concatenating strings, because people get mixed up
# with the quotation marks of their expression and the quotation marks _around_
# the expression (that make it into a string).
# It's not clear from your question where quarter and year_2dig come from,
# chose the correct expression from below. Alo, note the double quotes inside
# the expression and the single quotes to turn the expression into a string.
# if quarter and year_2dig are fields in the table, this will result in
# '"Q{}{}_{}".format(!QUARTER!, !YEAR_2DIG!, !OBJECTID!)'
expression = '"Q{}{}_{}".format(!QUARTER!, !YEAR_2DIG!, !OBJECTID!)'
# if quarter and year_2dig are python variables, this will result in
# '"Q122_{}".format(!OBJECTID!)'
expression = '"Q{}{}_'.format(quarter, year_2dig) + '{}".format(!OBJECTID!)'
arcpy.CalculateField_management(loccode_fc, "QRTR_KEY", expression, "PYTHON_9.3", "")
Have a great day!
Johannes