Problem to update fcurve driver
To get the driver

Py console code. Look at the drivers collection in the animation data. (animation data can be None need to test) 

Default file with cube selected and active. Cube has a deform modifier mod  name "SimpleDeform".  The "angle" property of the modifier has driver.  One component of the cubes location has a driver.

&gt;&gt;&gt; ob = C.object
&gt;&gt;&gt; for fcurve in ob.animation_data.drivers:
...     fcurve.data_path
...     
'location'
'modifiers["SimpleDeform"].angle'


Just as we added the driver to the modifier, we can get the path from the ID object (in this case bpy.types.Object type context object)

&gt;&gt;&gt; mod =  C.object.modifiers['SimpleDeform']

&gt;&gt;&gt; mod.id_data
bpy.data.objects['Cube']

&gt;&gt;&gt; mod.id_data is C.object
True

&gt;&gt;&gt; mod.path_from_id("angle")
'modifiers["SimpleDeform"].angle'


This is our "key" to finding driver 

&gt;&gt;&gt; key = 'modifiers["SimpleDeform"].angle'
&gt;&gt;&gt; fcurve = C.object.animation_data.drivers.find(key)
&gt;&gt;&gt; fcurve
bpy.data.objects['Cube']...FCurve

&gt;&gt;&gt; fcurve.driver.expression
'var + 0.785'

&gt;&gt;&gt; key = "badkey"
&gt;&gt;&gt; C.object.animation_data.drivers.find(key) is None
True


Here is a helper method, pass an object which returns the angle property driver of a deform modifier named modname or None

def get_deform_angle_driver(ob, modname):
    # does ob have modifiers
    if not hasattr(ob, "modifiers"):
        return None
    # does ob have animation data
    ad = ob.animation_data
    if not ad:
        return None
    # does ob have a modifier of that name
    bend = ob.modifiers.get(modname)
    if not bend:
        return None
    # make the key
    key = bend.path_from_id("angle")
    #key = 'modifiers["%s"].angle' % modname
    fcurve = ad.drivers.find(key)
    # is there a driver fcurve?
    if not fcurve:
        return None
    # woo hoo.. return the drive fcurve
    driver = fcurve.driver

    #driver.expression = "sin(frame/20)"

    return fcurve

# test code
import bpy
ob = bpy.context.object
fcurve = get_deform_angle_driver(ob, "bend")
print(fcurve)