UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'eIkBPaQS+uOAXD4DclrQl+N9+1eLFFCTiQalvrVm9So=' 
WHERE 
  key_id = 'aea1f027c15e03717fc1e86a6e38f8e79c3ec444db5768b9fed7b8ff7b1298da' 
  AND (
    token = 'eIkBPaQS+uOAXD4DclrQl+N9+1eLFFCTiQalvrVm9So=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00041