call the method cursor.execute with string "SELECT cache_key FROM %s WHERE cache_key = %%s and expires > %%s" as argument,
cursor . execute ( "SELECT cache_key FROM %s " "WHERE cache_key = %%s and expires > %%s" % table , [ key , connections [ db ] . ops . value_to_db_datetime ( now ) ] )