Walmart Inc. is testing technology in stores that would let people open security locks for products from their cellphones, a bid to protect against theft without hindering sales.