Definitions and origins  of the surname Lock, Locke and other variations:

Oxford dictionary of Surnames:
Variants: Locke, Loake, Locks

1: English: (i) nickname from Middle Englis lok, locke ‘lock of hair’ (old English locc), for someone with curly or otherwise noticable hair. Some bearers may belong with (2). (ii) relationship name from Old Scandinavian given name Lokki, Lokke (from lokkr ‘lock of hair’), on record in East Anglia.
Early bearers: Leuric Loc, Leovric Locc, 1130 in Pipe Rolls (Warwicks), 1130 in Curia Regis Rolls (Hants); Eustace Loc, 1235 in Cartae Antiquae (Essex); Johannes Lok, 1381 in Poll Tax (Little Fransham, Norfolk); Johannes Lok, 1381 in Poll Tax (Shrops); Beatrix Loke, 1381 in Poll Tax (Whaplode, Lincs); Cristina Lokkes, 1381 in Poll Tax (Long Wittenham, Berks); William Lock, 1541 in IGI (North Molton, Devon); Henry Lock, 1560 in IGI (Saint Mary le Bow, London); Thome Locks, 1591 in IGI (Blo Norton, Norfolk).

2: English: locative name from Middle English loke ‘enclosure’, also ‘barrier in a river which could be opened or closed’. Along the River Lea it was used to denote a bridge, unum pontem alias Lok, 1277. The surname may thus have denoted someone who lived near an enclosure or bridge or the keeper of a lock or bridge. A similar word loke exists in modern East Anglian dialect meaning ‘short grassy lane’, and some of the forms in (1) may belong with that.
Further information: Middle English forms of the name with a preposition are not well recorded, so the locative surname is probably rare compared with the nickname in (1).
​Early bearers: William de Lock, 1230 in Pipe Rolls (Berks); Robert Atteloke, 1300 in London Court Rolls; Anne Loake, 1574 in IGI (Bircham Newton, Norfolk).

===========================================================================

Last name: Lock: This interesting surname is of Anglo-Saxon origin, and has three distinct possible sources. Firstly, it may be a metonymic occupational name for a locksmith, from the Olde English pre 7th Century “loc”, lock, fastening. The name may also be topographical from residence near an enclosure, a place that could be locked, from the Middle English “loke”, a development of the Olde English “loca” The Middle English “loke” was used especially of a barrier on a river, which could be opened and closed at will, and, by extensions, of a bridge. The surname may thus also have been a metonymic occupational name for a lock- keeper. Finally, Locke may have originated as a nickname for someone with curly hair, from the Olde English “loc(c)”, Old High German “loc”, a lock (of hair). Early examples of the surname include: William de Lok, (Berkshire, 1230); William Lock, (Oxfordshire, 1273); and Robert Atteloke, (Cambridgeshire, 1300). Among the recordings of the name in London Church Registers are the christening of Joan, daughter of Mychaell Lock, at St. Giles’ Cripplegate, on April 25th 1568, and the marriage of Robert Lock and Mary Baker on October 22nd 1572, at St. Dunstan’s, Stepney. William Lock was an early emigrant to the American colonies, leaving London on the “Planter” in March 1634 bound for the Virginia Colony of New England. The first recorded spelling of the family name is believed to be that of Leuric Loc. This was dated 1130, in the “Pipe Rolls” of Warwickshire, during the reign of King Henry 1st of England, known as “The Lion of Justice”, 1100 – 1135. Surnames became necessary when governments introduced personal taxation. In England this was sometimes known as Poll Tax. Throughout the centuries surnames in every country have continued to “develop”, often leading to astonishing variants of the original spelling.

Read more: http://www.surnamedb.com/Surname/lock#ixzz4b71Z2ryf