UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/dZ1hrdMVMyCIxTcaJZ2GdiyHAeG0tJY1qHOMKWvF3Y=' 
WHERE 
  key_id = 'a59c95ae562bf19ae023ae680aef52f3110eed2c99904517f1365cf2cb8ffc3a' 
  AND (
    token = '/dZ1hrdMVMyCIxTcaJZ2GdiyHAeG0tJY1qHOMKWvF3Y=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00020