Now that I'm looking at the code again, can you even do that? Wouldn't you need to do something like:
user = db(db.Matworksheetdb.email==auth.user.email).select().first()
if user:
...
Or in your case:
user = db((
db.Matworksheeetdb.email==auth.user.email)&(db.Matworksheeetdb.mgp>session.mpg)).select().first()
if user:
user.update_record(...)
Regarding "and" and "&" I was confused since it didn't look like a query
without the db().

